Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore version validation for BCF in VCFHeaderReader because we only need the header #1707

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lindenb
Copy link
Contributor

@lindenb lindenb commented Mar 25, 2024

Description

For now HTSJDK does not support BCF2.2 but sometimes you just want to only get the VCF header in a BCF file while you don't care about the variants . e.g:

search all the vcfs in your filesystem with given dictionary and for given sample(s)).

So this PR, overrides BCF2Codec.validateVersionCompatibility in VCFheaderReader so the validation is just ignored.

VCFheaderReader is then used in SamSequenceDictionaryExtractor instead of VCFReader so we can extract a dictionary from a BCF2.2 file

I added tests.

Things to think about before submitting:

  • Make sure your changes compile and new tests pass locally.
  • Add new tests or update existing ones:
    • A bug fix should include a test that previously would have failed and passes now.
    • New features should come with new tests that exercise and validate the new functionality.
  • Extended the README / documentation, if necessary
  • Check your code style.
  • Write a clear commit title and message
    • The commit message should describe what changed and is targeted at htsjdk developers
    • Breaking changes should be mentioned in the commit message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant